//package com.yc.controller;
//
//import com.yc.Mapper.ResfoodMapper;
//import com.yc.bean.Resfood;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
///**
// * @ClassName FoodController
// * @since: 2023/8/19 19:59
// * @auth: kirito
// * @description:
// **/
//@RestController
//public class FoodController {
//    @Autowired
//    private ResfoodMapper resfoodMapper;
//
//    @RequestMapping(method = {RequestMethod.GET,RequestMethod.POST},
//            value = {"/findByid"})
//    public String findByid(@RequestParam("fid")int fid) {
//        Resfood resfood = resfoodMapper.selectById(fid);
//        return String.valueOf(resfood);
//    }
//
//    @RequestMapping(method = {RequestMethod.GET,RequestMethod.POST},
//            value = {"/findBypage"})
//    public String findByPage(@RequestParam("begin")int begin,
//                             @RequestParam("end")int end) {
//        List<Resfood> resfoods = resfoodMapper.selectFoodsByPage(begin, end);
//        return String.valueOf(resfoods);
//    }
//
//
//}
